<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/sslphrc.asp" -->
<%
Dim Recordset1__pID
Recordset1__pID = "0"
If (Request.Querystring("ID") <> "") Then 
  Recordset1__pID = Request.Querystring("ID")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_sslphrc_STRING
Recordset1.Source = "SELECT *  FROM dbo.rrcPayments  WHERE paymentID = " + Replace(Recordset1__pID, "'", "''") + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<html>

<head>
<title>Registration</title>
</head>

<body bgcolor="#FFFFFF" text="#000000" link="#6666CC" vlink="#999999" alink="#663333">
 
<% 
	Dim Msg, Mailer
	Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
   
	Mailer.FromAddress = chr(34) & Recordset1.Fields.Item("paymentEmail").Value & chr(34)
	Mailer.FromName = chr(34) & Recordset1.Fields.Item("paymentName").Value & chr(34)
	Mailer.RemoteHost = "smtp.ai-hosting.com"
	Mailer.AddRecipient "Redemptorist Retreat Center", "rrc@redemptoristretreat.org"
	Mailer.Subject = "Retreat Registration Form"
	Mailer.ContentType = "text/html"

	Msg = "<HTML><BODY><TABLE ALIGN=CENTER BORDER=1>"
	Msg = Msg & "<TR><TD>Registration Date/Time</TD><TD>" & Recordset1.Fields.Item("paymentRegDate").Value & "</TD></TR>"
	Msg = Msg & "<TR><TD>Name</TD><TD>" & Recordset1.Fields.Item("paymentName").Value & "</TD></TR>"
	Msg = Msg & "<TR><TD>Address</TD><TD>" & Recordset1.Fields.Item("paymentAddress1").Value & "</TD></TR>"
	Msg = Msg & "<TR><TD>City</TD><TD>" & Recordset1.Fields.Item("paymentCity").Value & "</TD></TR>"
	Msg = Msg & "<TR><TD>State</TD><TD>" & Recordset1.Fields.Item("paymentState").Value & "</TD></TR>"
	Msg = Msg & "<TR><TD>Zip Code</TD><TD>" & Recordset1.Fields.Item("paymentZip").Value & "</TD></TR>"
	Msg = Msg & "<TR><TD>Telephone</TD><TD>" & Recordset1.Fields.Item("paymentPhone").Value & "</TD></TR>"
	Msg = Msg & "<TR><TD>Email</TD><TD>" & Recordset1.Fields.Item("paymentEmail").Value & "</TD></TR>"
	Msg = Msg & "<TR><TD>Retreat Name/Date</TD><TD>" & Recordset1.Fields.Item("paymentRetreat").Value & "</TD></TR>"
	'Msg = Msg & "<TR><TD>Retreat Date</TD><TD>" & Request.Form("Date1") & "</TD></TR>"
	Msg = Msg & "<TR><TD>Payment Method</TD><TD>" & Recordset1.Fields.Item("paymentCCType").Value & "</TD></TR>"
	'Msg = Msg & "<TR><TD>Credit Card Number</TD><TD>" & Recordset1.Fields.Item("paymentCCNumber").Value & "</TD></TR>"
	'Msg = Msg & "<TR><TD>Credit Card Expiration</TD><TD>" & Recordset1.Fields.Item("paymentCCDate").Value & "</TD></TR>"
	Msg = Msg & "<TR><TD>Comments</TD><TD>" & Recordset1.Fields.Item("paymentComments").Value & "</TD></TR>"
	If Recordset1.Fields.Item("paymentCCType").Value <> "Check" Then
		Msg = Msg & "<TR><TD colspan=" & chr(34) & "2" & chr(34) & "><BR><a href=" & chr(34) & "https://secure6.appliedi.net/rretreat/ssl/admin/registration.asp?ID=" & Recordset1.Fields.Item("paymentID").Value & chr(34) & ">Click here to retrieve credit card information</a><BR></TD></TR>"
	End If
	Msg = Msg & "</TABLE></BODY></HTML>" 

	'Response.Write(Msg)
	
	Mailer.BodyText = Msg
	On Error Resume Next
	If Mailer.SendMail Then
	        Response.Redirect "https://secure6.appliedi.net/rretreat/ssl/thankyou.htm"
	Else
		Response.Write "Error encountered: " & Mailer.Response & ". Please contact rrc@redemptoristretreat.org"
	End If
%>

</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
